//乘法表
for (let i=1;i<10;i++){
    let line = "";
    for (let j=1;j<=i;j++){
        line += `${j}*${i}=${j*i}\t`
    }
    console.log(line)
}

//排序
var arr = [9,7,1,2,3,1,8,15,20,31]
function sort_test(arr) {
    let new_arr = []
    for (x of arr){
        new_arr[x]="1"
    }
    let new_arr2 = []
    for (let y=0;y<=new_arr.length;y++){
        if (new_arr[y]=='1') {
            new_arr2.push(y)
        }
    }
    console.log(new_arr2)
}
sort_test(arr)